package com.jt.demo;

import org.springframework.stereotype.Component;

@Component("cat")   //将对象交给Spring容器管理  key:cat  value:反射Cat对象
public class Cat implements Pet {
    @Override
    public void hello() {
        System.out.println("我是喵喵喵");

    }
}
